package fun.qu_an.minecraft.voicechatplugin;

import com.google.common.base.Suppliers;
import net.fabricmc.loader.api.FabricLoader;

import java.util.function.Supplier;

public class ModsHelper {
	public static final String TICK_STASIS_ID = "tick-stasis";
	public static final String TICK_STASIS_PACKAGE_NAME = "tick_stasis";
	public static final Supplier<Boolean> IS_TICK_STASIS_LOADED = supplier(TICK_STASIS_ID);

	private static Supplier<Boolean> supplier(String modId) {
		return Suppliers.memoize(() -> FabricLoader.getInstance().isModLoaded(modId));
	}
}
